#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
    @文件名      :currentTimeUnitToFPS.py
    @时间       :2024/5/19 下午7:51
    @作者       :刘继泽
"""
import maya.cmds as cmds
import maya.mel as mel

def currentTimeUnitToFPS():
	unit = cmds.currentUnit(q = True , time = True)
	fps = 0

	if unit == "game":
		fps = 15
	elif unit == "film":
		fps = 24
	elif unit == "pal":
		fps = 25
	elif unit == "ntsc":
		fps = 30
	elif unit == "show":
		fps = 48
	elif unit == "palf":
		fps = 50
	elif unit == "ntscf":
		fps = 60
	elif unit == "2fps":
		fps = 2
	elif unit == "3fps":
		fps = 3
	elif unit == "4fps":
		fps = 4
	elif unit == "5fps":
		fps = 5
	elif unit == "6fps":
		fps = 6
	elif unit == "8fps":
		fps = 8
	elif unit == "10fps":
		fps = 10
	elif unit == "12fps":
		fps = 12
	elif unit == "16fps":
		fps = 16
	elif unit == "20fps":
		fps = 20
	elif unit == "23.976fps":
		fps = 24.0 * 1000.0 / 1001.0
	elif unit == "29.97fps":
		fps = 30.0 * 1000.0 / 1001.0
	elif unit == "29.97df":
		fps = 30.0 * 1000.0 / 1001.0
	elif unit == "40fps":
		fps = 40
	elif unit == "47.952fps":
		fps = 48.0 * 1000.0 / 1001.0
	elif unit == "59.94fps":
		fps = 60.0 * 1000.0 / 1001.0
	elif unit == "75fps":
		fps = 75
	elif unit == "80fps":
		fps = 80
	elif unit == "100fps":
		fps = 100
	elif unit == "120fps":
		fps = 120
	elif unit == "125fps":
		fps = 125
	elif unit == "150fps":
		fps = 150
	elif unit == "200fps":
		fps = 200
	elif unit == "240fps":
		fps = 240
	elif unit == "250fps":
		fps = 250
	elif unit == "300fps":
		fps = 300
	elif unit == "375fps":
		fps = 375
	elif unit == "400fps":
		fps = 400
	elif unit == "500fps":
		fps = 500
	elif unit == "600fps":
		fps = 600
	elif unit == "750fps":
		fps = 750
	elif unit == "1200fps":
		fps = 1200
	elif unit == "1500fps":
		fps = 1500
	elif unit == "2000fps":
		fps = 2000
	elif unit == "3000fps":
		fps = 3000
	elif unit == "6000fps":
		fps = 6000
	elif unit == "44100fps":
		fps = 41000
	elif unit == "48000fps":
		fps = 48000

	return fps
